Skip to content

Fix tilde range upper bound for ~1.0.0 and ~1.0#10

Merged
andrew merged 1 commit intomainfrom
fix-tilde-range
Feb 22, 2026
Merged

Fix tilde range upper bound for ~1.0.0 and ~1.0#10
andrew merged 1 commit intomainfrom
fix-tilde-range

Conversation

@andrew
Copy link
Contributor

@andrew andrew commented Feb 19, 2026

Use segment counting instead of checking whether minor/patch are nonzero. The value-based check can't distinguish "specified as zero" from "not specified", so ~1.0.0 and ~1.0 incorrectly bumped major instead of minor.

Fixes #8

Use segment counting (like parsePessimisticRange already does) instead
of checking whether minor/patch are nonzero. The value-based check
can't distinguish "specified as zero" from "not specified", so ~1.0.0
and ~1.0 incorrectly bumped major instead of minor.

Fixes #8
@andrew andrew merged commit 9399496 into main Feb 22, 2026
2 checks passed
@andrew andrew deleted the fix-tilde-range branch February 24, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tilde range produces wrong upper bound for ~1.0.0 and ~1.0

1 participant